home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / WindowToFront / DocsEnglish / WindowToFront.doc < prev    next >
Encoding:
Text File  |  1996-09-27  |  22.6 KB  |  483 lines

  1.  
  2.  
  3.  
  4.                             WINDOWTOFRONT 1.1
  5.  
  6.  
  7.  
  8.    WARNING: WindowToFront requires AmigaOS Release 2 (or higher).
  9.  
  10.  
  11.    WindowToFront is an utility program that makes full use of Workbench's
  12. "Commodities Exchange" system.
  13.    It allows to bring to front any non-backdrop window with the chosen
  14. number of mouse clicks on it and to send it to the background in several
  15. ways; it is also possible to choose a different number of clicks for three
  16. distinct types of window, and even one for the window border.
  17.    All that can be done in various modes that are selectable with a control
  18. panel or using the tool types.
  19.    WindowToFront can be started from both Shell and Workbench, it can save
  20. into its icon the preferred settings and it can be adapted to any language
  21. using the locale.library or with a text file.
  22.  
  23.    Before continuing, I wish to apologize for my very poor english: I'm
  24. italian and in the high school I studied german.
  25.  
  26.  
  27.    1. THE HISTORY
  28.  
  29.    I wrote WindowToFront to remedy a problem of the similar ClickToFront
  30. program that comes with the 2.x operating system.
  31.    That program allows to bring to front any window with a double-click of
  32. the mouse: it isn't possible, with it, to choose a different number of
  33. clicks.
  34.    This wouldn't be by itself a serious problem to most users, were it not
  35. for a fact: by double-clicking on a disk icon in the main Workbench window
  36. (if it isn't backdrop) not only the disk's window opens, but the Workbench
  37. window also pops to the front, thus covering everything else on the screen,
  38. except the window just opened.
  39.  
  40.    At first I attempted to write a program able to recognize a double click
  41. on an icon as opposed to a double click on a free zone of the window, but
  42. this came out to be impossible: it doesn't exists any (documented) info
  43. in the system structures about the position of the Workbench icons.
  44.    Specifically I discovered that they aren't gadgets, as a reading of the
  45. include file "workbench/workbench.h" may induce to believe.
  46.    So the only way to make sure a double click on an icon doesn't bring
  47. the Workbench window to the front is to impose MORE than two clicks to
  48. bring it to front.
  49.    Obviously this is necessary only for the Workbench window, so for the
  50. others it's enough to make the usual two clicks; besides someone could even
  51. not be annoyed at all as I am because of the above problem.
  52.    So I wrote WindowToFront trying to meet everyone's needs: with it you
  53. can choose a number of clicks between 1 and 4 to bring to front three
  54. different types of window, and (that which ClickToFront doesn't allow) you
  55. can even send a window to back, always with an appropriate number of mouse
  56. clicks, usually combined with a qualifier such as ALT or CTRL.
  57.  
  58.  
  59.    2. GENERAL NOTES
  60.  
  61.    WindowToFront does nothing when the user select a gadget within a
  62. window. Some programs handle privately a double click on their gadgets, so
  63. WindowToFront should not interfere with them.
  64.    Furthermore, WindowToFront doesn't bring to front the backdrop windows.
  65. This may seem obvious, but there are public domain programs, such as, for
  66. instance, DMouse, that do just that! Did you ever attempt to use the Hex
  67. program (file editor by Nicola Salmoria) while DMouse runs in background
  68. and allows to bring to front the windows? Did you notice that, after a
  69. while, the Hex's calculator mysteriously disappears? It doesn't really
  70. disappear, but is concealed by the main (backdrop) window of Hex, onto
  71. which, it would seem, many mouse clicks are made within a short time.
  72.  
  73.  
  74.    3. SHELL USAGE
  75.  
  76.    To know the Shell template of WindowToFront, you can simply enter the
  77. typical
  78.  
  79.    WindowToFront ?
  80.  
  81.    The template, however, is the following:
  82.  
  83.    CX_PRIORITY/N/K,CX_POPKEY/K,CX_POPUP/K,CLICKS/N/K,CLICKS_WB/N/K,CLICKS_
  84. WBWIN/N/K,CLICKS_BORDER/N/K,CLICKS_BACK/N/K,QUALIFIER/K,QUALIFIER_BACK/K,WB
  85. ONLY/K,AUTOBACK/K,ACTIVATEBACK/K,TEXTFILE/K,GADGETS/K:
  86.  
  87.    The keywords appearing here match exactly the tool types you can insert
  88. in the WindowToFront's icon. Let's see their meaning and default values:
  89.  
  90.    CX_PRIORITY=<num>           [default: 0]
  91.    CX_POPKEY=<hotkey>          [default: CTRL w]
  92.    CX_POPUP=<YES | NO>         [default: NO]
  93.  
  94.    These three are common to all Commodities programs. They allow to
  95. specify the priority of the WindowToFront task compared to the others (the
  96. default is suggested), the key sequence that makes the control panel appear
  97. if it is hidden, and whether the panel must pop up at the program's start
  98. or remain hidden until called via the hotkey.
  99.  
  100.    CLICKS=<number of clicks>           [default: 2]
  101.  
  102.    This allows to choose the number of clicks that will be needed to bring
  103. to front a "normal" window, i. e. one that is neither the Workbench main
  104. one nor that of a Workbench disk or drawer (in short one that can't contain
  105. icons).
  106.    The selectable number of clicks varies from 1 to 4. Anyway, a single
  107. click is strongly inadvisable, as it creates a lot of confusion.
  108.    Specifying 0 as number of clicks disables this function.
  109.  
  110.    CLICKS_WB=<number of clicks>        [default: 3]
  111.  
  112.    This allows to choose the number of clicks to bring to front the main
  113. window of the Workbench, that is the one in which the disk icons appear.
  114. This is possible only if the window wasn't made backdrop. The suggested
  115. number for this option is 3, so that a double click on an icon doesn't
  116. bring to front the whole window.
  117.    Specifying 0 as number of clicks disables this function.
  118.  
  119.    CLICKS_WBWIN=<number of clicks>     [default: 2]
  120.  
  121.    With this you specify the number of clicks for the Workbench windows
  122. associated to a disk or to a drawer. Because these windows are usually
  123. smaller than the entire screen, normally it doesn't matter very much if
  124. they get brought to front "accidentally" by opening an icon that is located
  125. within them, therefore you can easily specify 2 for this option: naturally
  126. the final choice goes to the user.
  127.    Specifying 0 as number of clicks disables this function.
  128.  
  129.    CLICKS_BORDER=<number of clicks>    [default: 2]
  130.  
  131.    This allows to specify the number of click to bring to front any window
  132. when the mouse pointer is on its border or on its title bar (excluding the
  133. system gadgets).
  134.    Even the Workbench window can be brought to front with only two clicks
  135. this way (because on the title bar certainly can't be found any icon),
  136. while you can continue to use three of them for the inside of the window.
  137.    Specifying 0 as number of clicks DOES NOT disables the function, but
  138. means that the number of clicks to use for the border is the same defined
  139. for the inside of the window (differentiating between the three types of
  140. window). Otherwise the number of clicks for the border is the same for all
  141. window types.
  142.  
  143.    CLICKS_BACK=<number of clicks>      [default: 1]
  144.  
  145.    With this you specify the number of clicks that will be needed to send
  146. to the background any window when you will simultaneously press the key
  147. (or keys) indicated by the QUALIFIER_BACK (see below).
  148.    Because for this operation it is needed (usually) a qualifier, there are
  149. no problems to specify 1 as number of clicks: in fact, it is the more
  150. convenient choice.
  151.    Specifying 0 as number of clicks disables this function.
  152.  
  153.    QUALIFIER=<qualifier>               [default: NONE]
  154.  
  155.    The qualifier is that key or combination of keys (as, for instance,
  156. CTRL ALT) that must be held pressed while clicking on windows to make
  157. the bring-to-front function actually work.
  158.    Because in most cases the need to press one or more keys together with
  159. the mouse button slows down the operations (of the user, not of the
  160. computer), it is advisable to specify NONE for this option.
  161.  
  162.    QUALIFIER_BACK=<qualifier>          [default: LALT]
  163.  
  164.    This qualifier, instead, is indispensable to be able to distinguish
  165. between clicks made to bring a window to front and clicks made to send it
  166. to the background.
  167.    If the qualifiers for both operations were NONE or if they were equal,
  168. the send-to-back operation would always override the other (it would be
  169. the only one to be executed). This may seem odd, but in fact it is
  170. intentional, to discourage such a senseless and confusing choice.
  171.    The default background qualifier is the left ALT key, and it can be
  172. changed with this tool type. I advise against the use of the SHIFT keys,
  173. already handled by the Workbench, and of the AMIGA keys, that have a
  174. special significance to Intuition. This means that the keys more suitable
  175. to carry out this task are the two ALTs and CTRL.
  176.    A note on the qualifiers: by specifying separately two analogous keys,
  177. such as "LALT RALT", it will be required to SIMULTANEOUSLY press these
  178. keys. By specifying instead only their common part, such as "ALT", it will
  179. suffice to press any one of the two to perform the associated operation.
  180.    See also the paragraph 6 for a complete listing of the names suitable
  181. as qualifiers.
  182.  
  183.    WBONLY=<YES | NO>                   [default: YES]
  184.  
  185.    By default, WindowToFront performs its function only with the windows
  186. that appear on the Workbench screen (or on the default PUBLIC screen).
  187. By specifying NO here you obtain that the program work on the windows of
  188. all screens. Sometimes this may cause contrast with the operations of the
  189. program that opened these screens but usually there are no particular
  190. problems.
  191.    Note: for this tool type and all others of the same type (YES/NO) any
  192. specification different from "NO" (even a null string, such as "AUTOBACK="
  193. or "WBONLY") will be interpreted as YES.
  194.  
  195.    AUTOBACK=<YES | NO>                 [default: NO]
  196.  
  197.    The specification of YES here means that by using the number of clicks
  198. chosen to bring a window to front on a window that is already in front of
  199. all others (that is, it isn't obscured by others) this window will be sent
  200. to the background. If the window is instead partially obscured it will be
  201. brought to front as usual.
  202.  
  203.    ACTIVATEBACK=<YES | NO>             [default: NO]
  204.  
  205.    Usually a window you send to the background is a window you don't want
  206. to use for the moment, so there's no point at all in activating it. In fact
  207. by default WindowToFront won't activate the window you send to back in the
  208. normal way (that is, with the combination QUALIFIER_BACK + CLICKS_BACK),
  209. even if it will do so in the case of windows "sent away" with the AUTOBACK
  210. method. By specifying YES here you will make WindowToFront always activate
  211. the windows it sends to the background (although the reason of such a
  212. choice is completely beyond me).
  213.  
  214.    TEXTFILE=<filename>                 [default: S:wtf.txt]
  215.  
  216.    This keyword's purpose is to specify the name of the text file
  217. containing the strings the program will have to use while it is running.
  218. This allows to localize the program (to adapt it to a particular language)
  219. even if you don't own the locale.library.
  220.    The text file must be written in a specific format.
  221.    See the paragraph 7, "Localization", to have more detailed information
  222. about this topic.
  223.  
  224.    GADGETS=<YES | NO>                  [default: NO]
  225.  
  226.    Lastly, with this option you can tell the program whether you want the
  227. WindowToFront's control panel have at its bottom the two gadgets "Hide" and
  228. "Quit".
  229.    They aren't needed, as these two options are already present in the
  230. "Project" menu and their elimination allows to save some space by having
  231. a shorter window, but their presence could be a commodity some people just
  232. can't do without.
  233.  
  234.  
  235.    4. WORKBENCH USAGE
  236.  
  237.    The usage from Workbench is analogous to that of all others Commodities:
  238. you have just to run the program by double-clicking on its icon.
  239.    This operation will bring up the control panel if among the icon's tool
  240. types there is "CX_POPUP=YES", otherwise the program will start to run
  241. "silently" in the background.
  242.    To make the control panel appear you will then need to press the key
  243. combination specified with the "CX_POPKEY" tool type (also in the icon).
  244.    With the "Information..." item of the Workbench's "Icons" menu you can
  245. add, delete and modify the tool types of the WindowToFront's icon.
  246.    Alternatively, after you have modified the working parameters of
  247. WindowToFront using the control panel, you can save these parameters into
  248. the program's icon with the "Save" item of the "Project" menu. However
  249. some parameters, as for instance "CX_POPUP", can't be modified this second
  250. way.
  251.    The tool types recognized by WindowToFront from Workbench and their
  252. possible values are exactly the same described in the previous paragraph.
  253.    By moving WindowToFront into the "WBStartup" drawer (with its icon) the
  254. program will be launched automatically at every reboot. In this case you
  255. need to insert "DONOTWAIT" among the icon's tool types, as WindowToFront,
  256. as the other Commodities, isn't reentrant.
  257.  
  258.  
  259.    5. THE CONTROL PANEL
  260.  
  261.    It would not be really necessary to describe the usage of the control
  262. panel, because it's very intuitive, however let's examine briefly the
  263. various gadgets and menu. In referring to them I'll use their english name.
  264.  
  265.    "Hot Key:" - It allows to modify the hotkey (key combination) that is
  266. needed to bring up the control panel. If you insert there an incorrect
  267. expression the gadget's previous contents will be restored (after you
  268. press RETURN). Warning: capital letters such as "W" imply a simultaneous
  269. SHIFT key press.
  270.  
  271.    "About..." - It causes the appearance of a requester with some info
  272. on the program and the author. It is not a Copyright message as the program
  273. is public domain.
  274.  
  275.    "Normal Windows:" - This slider allows to change the number of clicks
  276. to use to bring in front the "normal" windows (those not belonging to the
  277. Workbench and not being able to contain icons). The change takes place in
  278. real time, that is, you don't need to close the control panel to make it
  279. operating.
  280.  
  281.    "Main Workbench Window:" - As above, but for the main Workbench window,
  282. that which contains the disk and Ram/Rad disk icons.
  283.  
  284.    "Workbench Windows:" - As above, but for the others windows owned by the
  285. Workbench (for example drawers).
  286.  
  287.    "Window Border:" - As above, but for the border of any window. Setting
  288. this slider as "Off" you obtain that the number of clicks to use on the
  289. border be the same you use inside the windows.
  290.  
  291.    "To Back:" - With this slider you specify the number of clicks to use
  292. to send the windows to the background (when it is simultaneously pressed
  293. the qualifier associated to this operation).
  294.  
  295.    "Workbench Only:" - This checkbox allows you to choose whether
  296. WindowToFront must operate on the windows of all screens or only on those
  297. of the Workbench screen.
  298.  
  299.    "AutoBack:" - Checkbox to activate/deactivate the AUTOBACK facility (see
  300. paragraph 3).
  301.  
  302.    "Activate Back:" - Checkbox to specify whether the windows sent to the
  303. background must be activated or not. This gadget will be disabled if the
  304. number of clicks to send windows to back is 0 (Off) or if it's 1 and you
  305. didn't specify any qualifier for the "send to back" operation.
  306.    In the latter case it's in fact necessary to always activate the window
  307. on which you click, or else no window will ever be able to be activated
  308. (at least in the usual mode, with a single click without qualifiers).
  309.  
  310.    "To Front:" - This string gadget contains the qualifier for the "Bring
  311. the window to front" operation. By inserting (with RETURN) an invalid
  312. qualifier the previous value will be restored.
  313.    By inserting a null string it will be displayed NONE or the equivalent
  314. term of the used language. It is possible to use directly that term or NONE
  315. (always valid with any language) to specify that indeed it isn't required
  316. any qualifier for the mentioned operation.
  317.  
  318.    "To Back:" - Exactly as above, but for the "Send the window to back"
  319. operation. It is strongly inadvisable to insert NONE here.
  320.  
  321.    "Hide" - This gadget is present only if you specified the tool type
  322. GADGETS=YES at the launch of WindowToFront (on the command line or in the
  323. icon). Its function is to make the control panel disappear keeping
  324. WindowToFront active in the background. You can achieve the same effect by
  325. pressing the "H" key (or another key depending on the used language, as
  326. specified in the configuration file or in the catalog file).
  327.    To recall the control panel you must press the hotkey.
  328.  
  329.    "Quit" - This gadget is present only if you specified the tool type
  330. GADGETS=YES at the launch of WindowToFront (on the command line or in the
  331. icon). Its function is to terminate the execution of WindowToFront and to
  332. remove it from memory. You can achieve the same effect by pressing the "Q"
  333. key (or another key depending on the used language, as specified in the
  334. configuration file or in the catalog file).
  335.  
  336.    "Save" (Project menu) - By selecting this menu item you save the current
  337. settings (hotkey, number of clicks, options, qualifiers) into the icon of
  338. WindowToFront. If that doesn't exist, the program creates it first.
  339.  
  340.    "Hide" (Project menu) - This menu item has the same function as the
  341. homonymous gadget (see).
  342.  
  343.    "Quit" (Project menu) - This menu item has the same function as the
  344. homonymous gadget (see).
  345.  
  346.    Lastly, it's worth remembering that the close gadget of the window of
  347. WindowToFront has the same effect as the "Hide" menu item (or gadget).
  348.  
  349.  
  350.    6. QUALIFIERS RECOGNIZED BY THE COMMODITIES.LIBRARY
  351.  
  352.    This is a listing of the qualifiers recognized by version 37 of the
  353. commodities.library and usable with WindowToFront.
  354.  
  355.    QUALIFIER               MEANING
  356.  
  357.    LCOMMAND                Left AMIGA key
  358.    RCOMMAND                Right AMIGA key
  359.    LSHIFT                  Left SHIFT key
  360.    RSHIFT                  Right SHIFT key
  361.    LALT                    Left ALT key
  362.    RALT                    Right ALT key
  363.    CAPSLOCK                Caps Lock key
  364.    CONTROL                 CTRL key
  365.    SHIFT                   Any SHIFT key
  366.    CAPS                    Any SHIFT key or Caps Lock
  367.    ALT                     Any ALT key
  368.  
  369.    Note: starting with version 38 (OS 2.1) of the commodities.library there
  370. are several synonyms for these qualifiers, but it's not necessary to list
  371. them here. If you own the 2.1 or 3.0 operating system you should find them
  372. reported in the system software manual.
  373.  
  374.  
  375.    7. LOCALIZATION
  376.  
  377.    By default WindowToFront communicates with the user in the english
  378. language, but, as I already said, the program can be localized, i. e.
  379. adapted to a specific language.
  380.    If you are among the lucky ones owning the 2.1 or 3.x operating system,
  381. you can (and should) take full advantage of the localization capability of
  382. WindowToFront in the Amiga's soon-to-be-standard way, namely by using the
  383. locale.library.
  384.    All you have to do is to copy the "windowtofront.catalog" file for your
  385. language, if supplied, to the directory LOCALE:Catalogs/<langname>, where
  386. <langname> is the name of your locale language. For example, if you are
  387. italian, you could copy the file "Catalogs/italiano/windowtofront.catalog"
  388. (found in the WindowToFront's distribuction directory) to the directory
  389. "LOCALE:Catalogs/italiano/" of your system, thus obtaining the localization
  390. file "LOCALE:Catalogs/italiano/windowtofront.catalog".
  391.    Of course you must also, if you don't have already done that, set your
  392. preferred language with the Locale preferences editor.
  393.  
  394.    If you, on the other hand, don't have the locale.library or don't find
  395. the .catalog file you need, you still can localize WindowToFront by using
  396. an alternate method.
  397.    This method consist of using the TEXTFILE keyword or tool type to let
  398. WindowToFront know the name of an ASCII text file containing the program's
  399. strings in the desired language, for instance by invoking the program with
  400.  
  401.    WindowToFront TEXTFILE=WORK:Config/wintofront.txt [other arguments here]
  402.  
  403. if the text file's name is "wintofront.txt" and it is in the "WORK:Config"
  404. directory.
  405.    If you don't use the TEXTFILE parameter WindowToFront will search a text
  406. file with the default name, that is "S:wtf.txt"; if no file is found the
  407. program will use its default internal strings, that are in english language
  408. (unless, of course, you can use the standard localization method).
  409.    Anyway, the size of the control panel and the position of the gadgets
  410. will be adapted to the length of the used strings.
  411.    I'll not explain the format of the text file (rather intuitive), as you
  412. shouldn't create one by yourself, but rather use (translating it into your
  413. language if necessary) one of those included with WindowToFront (tipically
  414. the english one, supplied just for that).
  415.    The lines of the file to translate or modify are the ones NOT beginning
  416. with a number. The others must be leaved as they are, and can be used as
  417. a reminder of the contents of the original string.
  418.    With version 1.1 of WindowToFront I supplied officially the files for
  419. the english and italian language; in the future I'll manage to add others
  420. of them.
  421.  
  422. NOTE 1: If you put together versions for other languages of the .catalog or
  423. text file, you're free (and welcome) to include them in the WindowToFront's
  424. directory before you redistribute the program, or even to spread them
  425. separately, always of course in the public domain.
  426.  
  427. NOTE 2: The format of the localization text file is changed from that
  428. recognized by WindowToFront 1.0, so you MUST use or modify one of those
  429. supplied with this version of the program; this means you CAN'T reuse the
  430. one you used previously with the mentioned version 1.0.
  431.  
  432. NOTE 3: The text file expedient, if it is used, overrides the "normal"
  433. localization method, even if the locale.library is present. To avoid this,
  434. if you plan to use only the standard localization method, you must make
  435. sure that there is no "wtf.txt" file in your system's S: directory (and
  436. obviously do not use the TEXTFILE keyword or tool type).
  437.  
  438.  
  439.    8. WARNINGS
  440.  
  441.    Generally to specify only one click without any qualifier for any
  442. operation causes confusion and serious troubles in the user's handling of
  443. the windows as well as interaction problems between him and Intuition.
  444.    It is recommended, therefore, to NOT do that.
  445.    Furthermore it is worth pointing out that starting with version 1.1
  446. WindowToFront is able to save its settings even if in its directory there
  447. is not an icon named after it; in this case the program will create a new
  448. icon for itself.
  449.    Finally, for various reasons it would take too much time to explain, I
  450. suggest you to not rename the program. Anyway "WindowToFront" is its
  451. official name and so I intend it to be known by Amiga users worldwide.
  452.  
  453.  
  454.    9. EXISTING REVISIONS
  455.  
  456.    1.1   The localization now also supports the locale.library (and in
  457.          the future it will support only that). The look of the panel is
  458.          slightly better. Now WindowToFront is able to create its icon
  459.          if this doesn't exist while saving the settings. Also added some
  460.          error messages. The about requester is now an EasyRequester.
  461.          Lastly, the executable is now 612 bytes shorter.
  462.  
  463.    1.0   The original version.
  464.  
  465.  
  466.    10. FINAL NOTES
  467.  
  468.    If you discover bugs, have doubts or want to send me suggestions (always
  469. welcomed) for the future versions of WindowToFront write to:
  470.  
  471.       Massimo Tantignone
  472.       Via Campagnoli, 4
  473.       28100 NOVARA
  474.       ITALY
  475.  
  476.  
  477.    And now for a traditional conclusion:
  478.  
  479.                //
  480.    Thanks to \X/ AMIGA for being the best computer ever!
  481.  
  482.  
  483.